package StudyCode.summary.myfile;

import java.io.File;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class SetFileDirectoryReadOnly {
	public static void main(String[] args) {
		File file = new File("E:\\迅雷下载\\test1.txt");
		boolean blnMarked  = file.setReadOnly();
		System.out.println("设置只读是否成功?: " + blnMarked);
		System.out.println("是否可以写入?: " + file.canWrite());
	}
}
